/**
 * @see [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/api/iBeacon.html#wxonbeaconservicechangecallback)
 */

export default function on_beacon_service_change() {
	return new Promise<{
		available: boolean;
		discovering: boolean;
	}>((resolve) => {
		wx.onBeaconServiceChange((available, discovering) => {
			resolve({ available, discovering });
		});
	});
}
